
	<div id="main" class="grid_23 alpha">
	
		<div class="post">
			<h1 id="lead"><?=$post_title?></h1>
			<?php if($this->session->flashdata('message')):?>
			<div class="message" id="message"><?=$this->session->flashdata('message');?></div>
			<?
				echo "<script>setTimeout(function (){document.getElementById('message').style.display = 'none';}, 2000)</script>";
			?>
			<?php endif;?>
			
			<?=validation_errors(); ?>
			<?=form_open('admin/post', array('id'=>'subForm')); ?>
			<?=form_hidden('id',$id)?>
			
			<p>
			<?php 
				echo form_label('文章名称','name', array('class'=>'label'));
				echo form_input('name', set_value('name', $post->name));
			?>
			</p>
			
			<p>
			<?php 
				echo form_label('文章内容','content', array('class'=>'label'));
				echo form_textarea(array('name'=>'content', 'id'=>'content'), set_value('content', $post->content));
			?>
			</p>

			<p>
			<?php 
				echo form_label('文章分类','typeid', array('class'=>'label'));
				
				$options = array();
				foreach($post_type as $type)
				{
					$options[$type->id] = $type->name;
				}
				if($post->typeid == '')
					echo form_dropdown('typeid', $options, set_value('typeid'));
				else
					echo form_dropdown('typeid', $options, set_value('typeid', $post->typeid));
			?>
			</p>
			
			<p>
			<?php 
				echo form_label('文章排序','order', array('class'=>'label'));
				
				$options = array();
				for ($i = 1; $i <= 50; $i++)
				{
					$options[$i] = $i;
					
				}
				if($post->order == '')
					echo form_dropdown('order', $options, set_value('order', 10));
				else
					echo form_dropdown('order', $options, set_value('order', $post->order));
			?>
			</p>
			<p>
			<?php 
				echo form_label('关键字','keywords', array('class'=>'label'));
				echo form_input('keywords', set_value('keywords', $post->keywords));
			?>
			</p>
			 
			<p>
				<?=form_submit('', '提交', 'id=subscribe');?>				
			</p>
			<?=form_close()?>
		</div>

		
    </div>
    
   

<script language="JavaScript" type="text/javascript" src="<?=base_url();?>js/kindeditor-3.5.5/kindeditor.js"></script>
  

<script language="JavaScript" type="text/javascript">
  KE.show({
                id : 'content',
                resizeMode : 1,
				allowPreviewEmoticons : false,
				allowUpload : true,
				width: '470px',
				items : [
				'source', '|', 'fontname', 'fontsize', '|', 'textcolor', 'bgcolor', 'bold', 'italic', 'underline',
				'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
				'insertunorderedlist', '|', 'emoticons', 'image', 'upload', 'link']
                
        });
</script>
  

	